<template>
    <div class="home1" style="height: 100%">
        <el-container style="min-height: 100vh">
            <el-main>
                <ZjhPage/>
                <ZjhPagetask/>
                <ZjhPagePunish/>
            </el-main>
        </el-container>
    </div>
</template>

<script>
    import ZjhPage from "./ZjhPage";
    import ZjhPagetask from "./ZjhPagetask";
    import ZjhPagePunish from "./ZjhPagePunish";
    export default {
        name: "ZjhPagetotal",
        components: {ZjhPagetask, ZjhPage,ZjhPagePunish},
        data() {
            return {

                collapseBtnClass:'el-icon-s-fold',
                isCollapsed:false,
                sideWidth:200,
                logoTextShow:true,
                // user:localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")):{}
                user:{}
            }
        },
        created() {
            // 页面加载时获取最新的User数据
            this.getUser()
        },
        getUser(){
            let username = localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")).username : "";
            // 从后台获取User数据
            this.request.get("/user/username/"+username).then(res=>{
                // 重新赋值
                this.user = res.data
            })
        },


    }
</script>

<style scoped>

</style>